package com.ibm.mall.action;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.ibm.mall.base.BaseAction;
import com.ibm.mall.model.Administrator;
import com.opensymphony.xwork2.ActionContext;

@Controller
@Scope("prototype")
public class AdminHomeAction extends BaseAction<Administrator> {

	private static final long serialVersionUID = 1L;
	
	public String index() {
		Administrator administrator=(Administrator) ActionContext.getContext().getSession().get("admin");
		if(administrator!=null){
			return "index";
		}else{
			return "toLoginUI";
		}
	}

}
